<template>
  <div>
    <!-- <order-header :title="title">
      <template #tip>
        <span>{{tip}}</span>
      </template>
    </order-header> -->
    <router-view></router-view>
    <service-bar></service-bar>
    <nav-footer></nav-footer>
  </div>
</template>

<script>

import NavFooter from '@/components/NavFooter'
import OrderHeader from '@/components/OrderHeader'
import ServiceBar from '../components/ServiceBar';

export default {
  name: 'OrderHome',
  data() {
    return {
      title: '',
      tip: '',
      path: this.$route.path,
      name: this.$route.name
    }
  },
  mounted() {

  },
  components: {
    NavFooter,
    OrderHeader,
    ServiceBar
  },
  watch: {
    name(nv) {
      console.log(nv);
      
    },
    path(nv) {
      console.log(nv);
      
    console.log(11111);

      if (path === '/order/confirm') {
        this.title = '订单确认'
        this.tip = '请认真填写收货地址'
      } else if (path === '/order/pay') {
        this.title = '订单支付'
        this.tip = '请谨防钓鱼链接或诈骗电话，了解更多>'
      } else if (path === '/order/list') {
        this.title = '订单列表'
        this.tip = '请谨防钓鱼链接或诈骗电话，了解更多>'
      }
    }
  }
}
</script>

<style lang="scss" scoped>
</style>